Skip to content

fix(ci): pass --ref tag to publish workflow dispatches#1124

Merged
chaliy merged 1 commit intomainfrom
claude/investigate-bashkit-version-Kc49q
Apr 6, 2026
Merged

fix(ci): pass --ref tag to publish workflow dispatches#1124
chaliy merged 1 commit intomainfrom
claude/investigate-bashkit-version-Kc49q

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 6, 2026

Summary

  • release.yml: Pass --ref $TAG to all gh workflow run calls so GITHUB_REF points to the release tag instead of refs/heads/main
  • publish-js.yml: Add resilient dist-tag detection that falls back to checking package.json version format when GITHUB_REF isn't a tag

Problem

npm latest tag has been stuck at 0.1.10 since v0.1.11. All subsequent versions (0.1.11–0.1.14) were published under the next dist-tag instead.

Root cause: release.yml dispatches publish workflows via gh workflow run without --ref. The release: [published] event doesn't fire because GitHub prevents recursive workflow triggers from GITHUB_TOKEN. Without --ref, GITHUB_REF defaults to refs/heads/main, and publish-js.yml classifies that as a pre-release → --tag next.

Test plan

  • Verify release.yml passes --ref $TAG to all three publish workflow dispatches
  • Verify publish-js.yml determines latest tag when GITHUB_REF is a version tag
  • Verify publish-js.yml falls back to latest when package.json has stable semver
  • Ship v0.1.16 release to confirm npm latest tag updates correctly

release.yml dispatched publish-js.yml without --ref, so GITHUB_REF
defaulted to refs/heads/main. publish-js classified this as pre-release
and used --tag next instead of latest. This left npm latest stuck at
0.1.10 while 0.1.11-14 were only tagged as next.

The release: [published] event does NOT trigger other workflows when
the release is created with GITHUB_TOKEN (GitHub prevents recursive
triggers), so explicit gh workflow run calls are the only working
dispatch path.

Fix: pass --ref $TAG to all gh workflow run calls so GITHUB_REF points
to the release tag. Also add fallback in publish-js to check package.json
version format for resilience against workflow_dispatch without --ref.
@chaliy chaliy merged commit 84786a1 into main Apr 6, 2026
11 checks passed
@chaliy chaliy deleted the claude/investigate-bashkit-version-Kc49q branch April 6, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant